XBRL REST API version v3
http://xbrl.prh.fi/api/{version}
- version: required(v3)
/reporting/documents/validate
Send documents to be validated
Get validation results for submission
post /reporting/documents/validate
Send documents to be validated
This scheme validates request by using a bearer token
Body
Media type: multipart/form-data
Type: object
Properties- requestMetadata: required(object)
Request metadata as JSON
- submissionID: required(string)
Submission ID
- establishmentID: required(string - pattern: ^[0-9]{7}\-[0-9]{1})
Business ID of the company submitting the report
- entityID: required(string - pattern: ^[0-9]{7}\-[0-9]{1})
Business ID of the company the report is for
- reportType: required(one of AFR, CFR, FAR)
Type of the report. AFR = financial report (individual), CFR = financial report (consolidated), FAR = annual report for foundation
- periodStart: required(date-only)
Start date of the accounting period
- periodEnd: required(date-only)
End date of the accounting period
- documents: required(array of object)
Documents connected to submission
Items: items
- documentName: required(one of financialStatement, annualReport)
Name of document
- attachmentType: required(one of IXBRL, ESEF)
Type of document
- schemaVersion: required(string)
Taxonomy / schema of document. Possible values can be fetched from /reporting/taxonomies
- documentName: required(one of financialStatement, annualReport)
Example:
{ "submissionID": "123123", "establishmentID": "9876543-2", "entityID": "1234567-8", "reportType": "AFR", "periodStart": "2020-01-01", "periodEnd": "2020-12-31", "documents": [ { "documentName": "financialStatement", "attachmentType": "IXBRL", "schemaVersion": "oytp_gaap_ind_2022-09-30" } ] } - submissionID: required(string)
- financialStatement: (file)
Financial statement as file (xhtml, zip)
- annualReport: (file)
Annual report as file (xhtml)
HTTP status code 202
Body
Media type: application/json
Type: object
Properties- validation: required(object)
Information about the submission sent for validation, partly the same as was sent in request
- submissionID: required(string)
Submission ID
- establishmentID: required(string - pattern: ^[0-9]{7}\-[0-9]{1})
Business ID of the company submitting the report
- entityID: required(string - pattern: ^[0-9]{7}\-[0-9]{1})
Business ID of the company the report is for
- reportType: required(one of AFR, CFR, FAR)
Type of the report. AFR = financial report (individual), CFR = financial report (consolidated), FAR = annual report for foundation
- periodStart: required(date-only)
Start date of the accounting period
- periodEnd: required(date-only)
End date of the accounting period
- documents: required(array of object)
Documents connected to submission
Items: items
- documentName: required(one of financialStatement, annualReport)
Name of document
- attachmentType: required(one of IXBRL, ESEF)
Type of document
- schemaVersion: required(string)
Taxonomy / schema of document. Possible values can be fetched from /reporting/taxonomies
- documentName: required(one of financialStatement, annualReport)
- receivedForValidationOn: required(datetime)
Timestamp of when submission was received for validation
- validationStatusEndpoint: required(string)
Endpoint where validation status for the submission can be checked
- submissionID: required(string)
Example:
{
"validation": {
"submissionID": "123123",
"establishmentID": "9876543-2",
"entityID": "1234567-8",
"reportType": "AFR",
"periodStart": "2020-01-01",
"periodEnd": "2020-12-31",
"documents": [
{
"documentName": "financialStatement",
"attachmentType": "IXBRL",
"schemaVersion": "oytp_gaap_ind_2022-09-30"
}
],
"receivedForValidationOn": "2024-06-25T13:29:07.909Z",
"validationStatusEndpoint": "/reporting/documents/validate?submissionID=123123"
}
}HTTP status code 400
Request contains invalid data and cannot be fulfilled
Body
Media type: application/json
Type: object
Properties- detail: required(array of responseTypes.errorDetail)
Items: errorDetail
- loc: required(string)
- msgEn: required(string)
- msgFi: required(string)
- msgSv: required(string)
- type: required(string)
Example:
{
"detail": [
{
"loc": "errorLocation",
"msgEn": "Error description",
"msgFi": "Virheen kuvaus",
"msgSv": "Felbeskrivning",
"type": "string"
}
]
}HTTP status code 401
Bad or expired token. This can happen if the user or authenticator revoked or expired an access token. To fix, re-authenticate the user.
HTTP status code 403
Insufficient privileges. Unfortunately, re-authenticating the user won't help here.
HTTP status code 500
An internal error occurred
Secured by Bearer
Headers
- Authorization: required(string)
The header should contain a valid access token
Example:
Bearer 007ba425-3b2a-4341-9098-a54c608cd939
get /reporting/documents/validate
Get validation results for submission
This scheme validates request by using a bearer token
Query Parameters
- submissionID: required(string)
ID for the submission
Example:
123123
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- submissionID: required(string)
Submission ID
- documents: required(array of object)
Items: items
- documentName: required(one of financialStatement, annualReport)
Name of document
- attachmentType: required(one of IXBRL, ESEF)
Type of document
- schemaVersion: required(string)
Taxonomy / schema of document. Possible values can be fetched from /reporting/taxonomies
- validationStatus: required(one of ongoing, success, fail)
Description of the validation status
- validationResult: required(union of responseTypes.validationResult or nil)
- documentName: required(one of financialStatement, annualReport)
Examples:
ongoing:
{
"submissionID": "123123",
"documents": [
{
"documentName": "financialStatement",
"attachmentType": "IXBRL",
"schemaVersion": "oytp_gaap_ind_2022-09-30",
"validationStatus": "ongoing",
"validationResult": null
}
]
}success:
{
"submissionID": "123123",
"documents": [
{
"documentName": "financialStatement",
"attachmentType": "IXBRL",
"schemaVersion": "oytp_gaap_ind_2022-09-30",
"validationStatus": "success",
"validationResult": {
"duration": 3000,
"creationDate": "2024-11-01T10:00:30.445+00:00",
"completionDate": "2024-11-01T10:00:33.445+00:00",
"errorCount": 0,
"memos": []
}
}
]
}fail:
{
"submissionID": "123123",
"documents": [
{
"documentName": "financialStatement",
"attachmentType": "IXBRL",
"schemaVersion": "oytp_gaap_ind_2022-09-30",
"validationStatus": "fail",
"validationResult": {
"duration": 3000,
"creationDate": "2024-11-01T10:00:30.445+00:00",
"completionDate": "2024-11-01T10:00:33.445+00:00",
"errorCount": 1,
"memos": [
"Validation error description"
]
}
}
]
}HTTP status code 400
Request contains invalid data and cannot be fulfilled
Body
Media type: application/json
Type: object
Properties- detail: required(array of responseTypes.errorDetail)
Items: errorDetail
- loc: required(string)
- msgEn: required(string)
- msgFi: required(string)
- msgSv: required(string)
- type: required(string)
Example:
{
"detail": [
{
"loc": "errorLocation",
"msgEn": "Error description",
"msgFi": "Virheen kuvaus",
"msgSv": "Felbeskrivning",
"type": "string"
}
]
}HTTP status code 401
Bad or expired token. This can happen if the user or authenticator revoked or expired an access token. To fix, re-authenticate the user.
HTTP status code 403
Insufficient privileges. Unfortunately, re-authenticating the user won't help here.
HTTP status code 500
An internal error occurred
Secured by Bearer
Headers
- Authorization: required(string)
The header should contain a valid access token
Example:
Bearer 007ba425-3b2a-4341-9098-a54c608cd939
/reporting/documents/send
Send submission after successful validation
post /reporting/documents/send
Send submission after successful validation
This scheme validates request by using a bearer token
Body
Media type: application/json
Type: object
Properties- submissionID: required(string)
Submission ID
Example:
{
"submissionID": "123123"
}HTTP status code 200
Body
Media type: application/json
Type: object
Properties- submissionID: required(string)
Submission ID
- receivedOn: required(datetime)
Timestamp when request was processed
Example:
{
"submissionID": "123123",
"receivedOn": "2024-06-25T13:29:07.909Z"
}HTTP status code 400
Request contains invalid data and cannot be fulfilled
Body
Media type: application/json
Type: object
Properties- detail: required(array of responseTypes.errorDetail)
Items: errorDetail
- loc: required(string)
- msgEn: required(string)
- msgFi: required(string)
- msgSv: required(string)
- type: required(string)
Example:
{
"detail": [
{
"loc": "errorLocation",
"msgEn": "Error description",
"msgFi": "Virheen kuvaus",
"msgSv": "Felbeskrivning",
"type": "string"
}
]
}HTTP status code 401
Bad or expired token. This can happen if the user or authenticator revoked or expired an access token. To fix, re-authenticate the user.
HTTP status code 403
Insufficient privileges. Unfortunately, re-authenticating the user won't help here.
HTTP status code 500
An internal error occurred
Secured by Bearer
Headers
- Authorization: required(string)
The header should contain a valid access token
Example:
Bearer 007ba425-3b2a-4341-9098-a54c608cd939
/reporting/taxonomies
Get supported taxonomies
get /reporting/taxonomies
Get supported taxonomies
This scheme validates request by using a bearer token
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: items
- companyForm: required(string)
- schemaVersions: required(array of string)
Example:
[
{
"companyForm": "OY",
"schemaVersions": [
"oytp_gaap_ind_2019-03-28",
"oytp_gaap_con_2019-03-28",
"oytp_gaap_ind_2019-11-06",
"oytp_gaap_con_2019-11-06",
"oytp_gaap_ind_2022-09-30",
"oytp_gaap_con_2022-09-30"
]
},
{
"companyForm": "SR",
"schemaVersions": [
"stp_gaap_ind_2019-11-06",
"stp_gaap_con_2019-11-06",
"stp_gaap_ind_2022-09-30",
"stp_gaap_con_2022-09-30",
"stk_gaap_2022-09-30"
]
},
{
"companyForm": "OYJ",
"schemaVersions": [
"ESEF-2022"
]
}
]
HTTP status code 401
Bad or expired token. This can happen if the user or authenticator revoked or expired an access token. To fix, re-authenticate the user.
HTTP status code 403
Insufficient privileges. Unfortunately, re-authenticating the user won't help here.
Secured by Bearer
Headers
- Authorization: required(string)
The header should contain a valid access token
Example:
Bearer 007ba425-3b2a-4341-9098-a54c608cd939